package com.watson.s2sh.platform.service;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.watson.s2sh.platform.dao.MenuItemDao;
import com.watson.s2sh.platform.domain.MenuItem;

@Transactional
public class MenuItemServiceImpl implements MenuItemService{
	
	private MenuItemDao menuItemDao;
	
	@Transactional(propagation = Propagation.REQUIRED)  
    public void save(MenuItem menuItem){  
		menuItemDao.save(menuItem);
    }
	
	@Transactional(propagation = Propagation.REQUIRED)  
	public List<MenuItem> findAllMenuItem() {
		return menuItemDao.findAllMenuItem();
	}  
      
    @Transactional(propagation = Propagation.REQUIRED)  
    public MenuItem get(Long id){  
        return menuItemDao.get(id);  
    }
    
    @Transactional(propagation = Propagation.REQUIRED)  
    public void delete(MenuItem menuItem){  
    	menuItemDao.delete(menuItem);
    }

	public MenuItemDao getMenuItemDao() {
		return menuItemDao;
	}

	public void setMenuItemDao(MenuItemDao menuItemDao) {
		this.menuItemDao = menuItemDao;
	}

}
